import storage_set from '@feidao/web/atom/nodejs/storage/put';
import storage_get from '@feidao/web/atom/nodejs/storage/get';

import find_data from '@feidao/web/atom/nodejs/msg/find';

export default async function get_db() {
	const dt = await storage_get('industry', 'db');
	if (!dt) {
		const data = await find_data("xmedia", "1094", 1, "industry", { pub_industry_name: 1 }, {}, 1, 0, {}, "");
		await storage_set('industry', data, null);
		return data;
	} else {
		return dt;
	}
}